
VARIABLES
** GIS Variables
        GISVOL(t)          Volume GIS
        TSTARlin(t)        Equilibrium temp vol relationship Alley model
        VDOT(T)            Change in V per 5 years
        TD(T)              T minus Tstar
        SLR(T)             Sea level rise from 2000
        SIGNTD(T)          Sign of TD
;
EQUATIONS
** GIS equations
        GISVOLEQ(t)       Volume GIS
        TSTARlineq(t)       Equilibrium vol equation
        TDeq(T)           Equation for TD
        VDOTEQ(T)         Change in V per 5 years
        SLREQ(T)          Sea level rise equation
        SIGNTDEQ(T)       Equation for sign of TD   ;
    ;

** GIS equations
GISVOLEQ(t+1)..      GISVOL(T+1) =e= GISVOL(T)+VDOT(T+1);
TSTARlinEQ(t)..      TSTARlin(t) =e= tmaxa*(1-GISVOL(T)/100);
TDeq(t)..            TD(t)       =e= (tatm(t)-tstarlin(t))+.00001;
SLREQ(T)..           SLR(T)      =E= slrgis*(1-GISVOL(T)/100);
SIGNTDEQ(T)..        SIGNTD(T)   =E= (TD(T)+.0000001)/((power(TD(t),2)**.5)+.0000001);
VDOTEQ(T)..          VDOT(T)     =E= SIGNTD(T)*avoldot*(power(TD(t),2))* ((GISVOL(t)/100)**expvol);


** unused
* GISVOLEQ(t+1)..      GISVOL(T+1) =e= power(GISVOL(T)+VDOT(T),2)**.5 + .1
*GISVOLEQ(t+1)..      GISVOL(T+1) =e= GISVOL(T)+VDOT(T)*(1-ifirrev)+ifirrev*VDOTirrev(t);
*GISVOLEQ(t+1)..      GISVOL(T+1) =e= 60;
*TSTARAEQ(t)..        TSTARA(t) =e= 2;
*VDOTEQ(T)..          VDOT(T)  =E= -.001;
*VDOTEQ(T)..          VDOT(T)  =E=  avoldot* TD(t);
*TSTARlinEQ(t)..      TSTARlin(t) =e= tmaxa*(1-GISVOL(T)/100)*(1-gisvol(t)/100)**.01;


signtd.up(t)= 2;
signtd.lo(t)= -2;
